using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using AtletIS.DomainModel.Entities.Web;

namespace AtletIS.Database.Mapping.Web
{
    public class YearMap : EntityTypeConfiguration<Year>
    {
        public YearMap()
        {
            // Primary Key
            this.HasKey(t => t.YearValue);

            // Properties
            this.Property(t => t.YearValue)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            // Table & Column Mappings
            this.ToTable("Years");
            this.Property(t => t.YearValue).HasColumnName("Year");
        }
    }
}
